
package com.qianxun.module.datasource1.develop.mapper;

import com.qianxun.module.datasource1.develop.entity.SysFunctionRoleRelation;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author: admin
* @date: 2019-11-27
* @version: 1.0.0
*/
public interface SysFunctionRoleRelationMapper extends BaseMapper<SysFunctionRoleRelation> {

    /**
     * 删除功能角色id所对应的所有数据
     * @param functionRoleId
     */
    void deleteByFunctionRoleId(@Param(value = "functionRoleId") Integer functionRoleId);
    /**
     * 删除功能角色id所对应的所有数据
     * @param functionRoleIdList
     */
    void deleteByFunctionRoleIdList(@Param(value = "functionRoleIdList") List<Integer> functionRoleIdList);

    /**
     * 查询功能角色的所有数据
     * @param functionRoleId 功能角色id
     * @return
     */
    List<SysFunctionRoleRelation> selectListByFunctionRoleId(@Param(value = "functionRoleId") Integer functionRoleId);

    /**
     * 查询指定功能角色所映射的所有功能id
     * @param functionRoleId 功能角色id
     * @return
     */
    List<Integer> selectFunctionIdByFunctionRoleId(@Param(value = "functionRoleId") Integer functionRoleId);

    /**
     * 查询指定功能id所映射的所有功能角色的名称列表
     * @param functionId 功能id
     * @return
     */
    List<String> selectFunctionNameByFunctionId(@Param(value = "functionId") Long functionId);
}
